#!/bin/bash

cd ~

if [ ! -d "stacks" ]; then
    read -p "clone stacks"
    git clone https://atomgit.com/ntlv1/stacks.git
    cd stacks
else
    cd stacks
    git pull
fi

read -p "aid restore"
bash ~/server-tools/scigo/rclone/aid-restore.sh

# read -p "data restore"
# bash ~/server-tools/common/rclone/data-restore.sh

read -p "docker login aliyun vpc"
docker login registry.cn-zhangjiakou.aliyuncs.com

read -p "frpc"
cd frpc
bash get-image.sh
bash get-permissions.sh
docker compose up -d
cd ..

read -p "mtphotos"
cd mtphotos
bash get-image.sh
bash get-permissions.sh
docker compose up -d
cd ..

echo "Docker deploy finish!"
# cd ~
